package cn.sc.allinpay.allfavour.business.common.data;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;
import java.util.ArrayList;

/**
 * description：会员信息
 * author：pany
 * on 2018/8/2 16:06
 */
public class MemberData implements Parcelable {
//    private RightData right;//会员优惠
    private ArrayList<CouponsData> coupons;//会员电子券
    private String memberName;//会员姓名
    private String level;//会员等级
    private String bal;//会员卡余额
    private String  cardNo;//会员卡号
    private String oilDiscountName; //优惠名称
    private BigDecimal oilDiscountAmt; //优惠金额
    private String authCode;//会员动态码
    private String authType;//1扫码 2手动输入

    public MemberData() {

    }

    protected MemberData(Parcel in) {
//        right = in.readParcelable(RightData.class.getClassLoader());
        coupons = in.createTypedArrayList(CouponsData.CREATOR);
        memberName = in.readString();
        level = in.readString();
        bal = in.readString();
        cardNo = in.readString();
        oilDiscountName = in.readString();
        oilDiscountAmt = new BigDecimal(in.readString());
        authCode = in.readString();
        authType = in.readString();
    }

//    public RightData getRight() {
//        return right;
//    }
//
//    public void setRight(RightData right) {
//        this.right = right;
//    }

    public ArrayList<CouponsData> getCoupons() {
        return coupons;
    }

    public void setCoupons(ArrayList<CouponsData> coupons) {
        this.coupons = coupons;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getBal() {
        return bal;
    }

    public void setBal(String bal) {
        this.bal = bal;
    }

    public String getCardNo() {
        return cardNo;
    }
    public String getOilDiscountName() {
        return oilDiscountName;
    }
    public BigDecimal getOilDiscountAmt() {
        return oilDiscountAmt;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }
    public void setOilDiscountName(String oilDiscountName) {
        this.oilDiscountName = oilDiscountName;
    }
    public void setOilDiscountAmt(BigDecimal oilDiscountAmt) {
        this.oilDiscountAmt = oilDiscountAmt;
    }

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode;
    }

    public String getAuthType() {
        return authType;
    }

    public void setAuthType(String authType) {
        this.authType = authType;
    }

    public static final Creator<MemberData> CREATOR = new Creator<MemberData>() {
        @Override
        public MemberData createFromParcel(Parcel in) {
            return new MemberData(in);
        }

        @Override
        public MemberData[] newArray(int size) {
            return new MemberData[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
//        parcel.writeParcelable(right, i);
        parcel.writeTypedList(coupons);
        parcel.writeString(memberName);
        parcel.writeString(level);
        parcel.writeString(bal);
        parcel.writeString(cardNo);
        parcel.writeString(oilDiscountName);
        parcel.writeString(oilDiscountAmt.toString());
        parcel.writeString(authCode);
        parcel.writeString(authType);
    }
}
